<?php
namespace Core\CoreComponents\EventsManager;

/**
* This interface provide all accessible methods on event module
*
* @method ServiceResponse addEvent($title, $description, $eventDate, $numberOfPlace)
* @method ServiceResponse attachPosterOnAnEvent($idEvent, $file, $mime, $extension)
* @method ServiceResponse preSubscribe($userId, $eventId)
* @method ServiceResponse getEventSubscriptions()
* @method ServiceResponse getValidEventSubscriptionsForPlannedEvent()
* @method ServiceResponse getEventSubscriptionsToValid()
* @method ServiceResponse updateEventSubscription($id, $state)
* @method ServiceResponse getEvents()
* @method ServiceResponse getStates()
* @method ServiceResponse getArchivesEvent($archiveRootPath, $id)
* @method ServiceResponse getEventSubscriptionStates()
* @method ServiceResponse getOnlineEvents()
* @method ServiceResponse getDoneEvents()
* @method ServiceResponse deleteEvent($id)
* @method ServiceResponse updateEvent($id, $title, $description, $startDate, $startTime, $endDate, $endTime, $numberOfPlaces, $archiveName, $state, $location)
* @method ServiceResponse attachArchive($idEvent, $archiveName)
* @method ServiceResponse planEvent($id)
* @method ServiceResponse closeSubscriptionsEvent($id)
* @method ServiceResponse runEvent($id)
* @method ServiceResponse cancelEvent($id)
* @method ServiceResponse doneEvent($id)
* @method ServiceResponse attachEventAttachment($eventId, $file, $mime, $extension)
* @method ServiceResponse getEventAttachments($eventId)
*/
interface IEvents
{
	/**
	* Add a event
	*
	* @param string $title The event title
	* @param string $description The event description
	* @param datetime $startDate The start event date
	* @param datetime $endDate The end event date
	* @param int $numberOfPlaces The number of places
	* @param string $location The event location
	* 
	* @return ServiceResponse This response contains the added event
	*/
	public function addEvent($title, $description, $startDate, $startTime, $endDate, $endTime, $numberOfPlaces, $location, $isSubscriptionValidationRequired);
	
	/**
	* Attach a poster on an event
	*
	* @param int $idEvent The event id
	* @param binary[] $file The poster file
	* @param string $mime The poster file mime type
	* @param string $extension The poster file extension
	* 
	* @return ServiceResponse This response contains the event with his poster
	*/
	public function attachPosterOnAnEvent($idEvent, $file, $mime, $extension);
	
	/** 
	* Pre subscribe an user to an event
	*
	* @param integer $userId The user who want to subscribe
	* @param integer $eventId The user event's want to participate
	*
	* @return ServiceResponse This response contains event subscription
	*/
	public function preSubscribe($userId, $eventId);
	
	/** 
	* Get all event subscriptions
	*
	* @return ServiceResponse This response contains all event subscription
	*/
	public function getEventSubscriptions();
	
	/** 
	* Get all personal events
	*
	* @return ServiceResponse This response contains all personal events
	*/
	public function getPersonalEvents($userId);
	
	/** 
	* Set user as partner on an event subscription
	*
	* @return ServiceResponse This response contains event subscription
	*/
	public function userIsPartner($EventSubscriptionId, $isPartner);
	
	/** 
	* Get all valid event subscriptions for planned events
	*
	* @return ServiceResponse This response contains all valid event subscription for planned events
	*/
	public function getValidEventSubscriptionsForPlannedEvent();
	
	/** 
	* Get all event subscriptions to valid
	*
	* @return ServiceResponse This response contains all event subscription to valid
	*/
	public function getEventSubscriptionsToValid();
	/** 
	* Update the event subscription event subscriptions
	*
	* @param integer $id The event subscription id
	* @param integer $state The event subscription new state
	*
	* @return ServiceResponse This response contains all event subscription
	*/
	public function updateEventSubscription($id, $state);
	
	/**
	* Get all events
	* 
	* @return ServiceResponse This response contains all events
	*/
    public function getEvents();
	
	/**
	* Get all participants on an event
	* 
	* @param integer $id The event id
	*
	* @return ServiceResponse This response contains all participants
	*/
    public function getParticipants($id);
	
	/**
	* Get all event states
	*
	* @return ServiceResponse This response contains all states event
	*/
	public function getStates();
	
	/**
	* Get all archives event
	*
	* @param string $archiveRootPath The archive root path
	* @param integer $id The event id
	*
	* @return ServiceResponse This response contains all archives event
	*/
	public function getArchivesEvent($archiveRootPath, $id);
	
	/**
	* Get all event subscriptions states
	*
	* @return ServiceResponse This response contains all states event subscriptions
	*/
	public function getEventSubscriptionStates();
	
	/**
	* Get all online events
	* 
	* @return ServiceResponse This response contains all online events
	*/
    public function getOnlineEvents();
	
	/**
	* Get all done events
	* 
	* @return ServiceResponse This response contains all done events
	*/
    public function getDoneEvents();
	
	/**
	* Delete an event
	* 
	* @param integer $id The unique event identifier
	*
	* @return ServiceResponse This response contains the deleted event
	*/
	public function deleteEvent($id);
	
	/**
	* Update an event
	* 
	* @param integer $id The unique event identifier
	* @param string $title The event title
	* @param string $description The event description
	* @param datetime $startDate The start event date
	* @param datetime $endDate The end event date
	* @param string $archiveName The end event date
	* @param int $state The event state
	* @param string $location The event location
	*
	* @return ServiceResponse This response contains the updated event
	*/
	public function updateEvent($id, $title, $description, $startDate, $startTime, $endDate, $endTime, $numberOfPlaces, $archiveName, $state, $location);
	
	/**
	* Attach an archive to an event
	* 
	* @param integer $id The unique event identifier
	* @param string $archiveName The archive folder name
	*
	* @return ServiceResponse This response contains the deleted event
	*/
	public function attachArchive($idEvent, $archiveName);
	
	/**
	* Plan an event
	* 
	* @param integer $id The unique event identifier
	*
	* @return ServiceResponse This response contains the planned event
	*/
	public function planEvent($id);
	
	/**
	* Close subscriptions on an event
	* 
	* @param integer $id The unique event identifier
	*
	* @return ServiceResponse This response contains the closed subscriptions event
	*/
	public function closeSubscriptionsEvent($id);
	
	/**
	* Run an event
	* 
	* @param integer $id The unique event identifier
	*
	* @return ServiceResponse This response contains the running event
	*/
	public function runEvent($id);
	
	/**
	* Cancel an event
	* 
	* @param integer $id The unique event identifier
	*
	* @return ServiceResponse This response contains the cancelled event
	*/
	public function cancelEvent($id);
	
	/**
	* Done an event
	* 
	* @param integer $id The unique event identifier
	*
	* @return ServiceResponse This response contains the done event
	*/
	public function doneEvent($id);
	
	/**
	* Attach an attachment on an event
	* 
	* @param integer $eventId The unique event identifier
	* @param binary[] $file The file content
	* @param string $mime The mime file
	* @param string $extension The extension file
	*
	* @return ServiceResponse This response contains the event attachment
	*/
	public function attachEventAttachment($eventId, $name, $file, $mime, $extension);
	
	/**
	* Get all event attachments
	* 
	* @param integer $eventId The unique event identifier
	*
	* @return ServiceResponse This response contains all event attachments
	*/
	public function getEventAttachments($eventId);
	
	/**
	* Get all event attachments
	* 
	* @param integer $eventId The unique event identifier
	*
	* @return ServiceResponse This response contains all event attachments
	*/
	public function getEventAttachment($id);
	
	/**
	* Delete an event attachment
	* 
	* @param integer $eventId The unique event identifier
	*
	* @return ServiceResponse This response contains all event attachments
	*/
	public function deleteEventAttachment($id);
}

?> 